package com.fanhang.samples.spring.jms;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * 
 */
@Component
public class TestMessageListener {

	private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
	
	@JmsListener(destination="USER.MQ.DISALLOW.SPEAK")
	public void disallowSpeak(String message) {
		LOGGER.info("JMS Disallow User Message: " + message);
		System.out.println(message);
	}
	
	@JmsListener(destination="USER.MQ.DISALLOW.USER")
	public void disallowUser(String message) {
		LOGGER.info("JMS Disallow User Message: " + message);
		System.out.println(message);
	}
}
